home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
byt85feb.lbr
/
SIGEN.BAS
< prev
Wrap
BASIC Source File
|
1985-09-15
|
896b
|
27 lines
10 ' *** SIGEN.BAS ***
20 ' Generate a Silicon lattice of Nx, Ny, Nz unit cells
30 ' E. Kirkland 15-SEP-84
40 DEFINT I-N:DEFSNG A-G,O-Z
50 INPUT "Generate Nx,Ny,Nz Silicon unit cells : ",NX,NY,NZ
60 INPUT "Output file name : ",FILE$
70 OPEN FILE$ FOR OUTPUT AS #1:SIZE=.15
80 FOR IX=0 TO NX
90 FOR IY=0 TO NY
100 FOR IZ=0 TO NZ
110 WRITE#1,IX,IY,IZ,SIZE
120 IF (IX=NX) OR (IY=NY) OR (IZ=NZ) GOTO 230
130 WRITE#1,IX+.5,IY+.5,IZ,SIZE
140 WRITE#1,IX+.5,IY,IZ+.5,SIZE
150 WRITE#1,IX,IY+.5,IZ+.5,SIZE
160 WRITE#1,IX+.5,IY+.5,IZ+1,SIZE
170 WRITE#1,IX+.5,IY+1,IZ+.5,SIZE
180 WRITE#1,IX+1,IY+.5,IZ+.5,SIZE
190 WRITE#1,IX+.25,IY+.25,IZ+.25,SIZE
200 WRITE#1,IX+.25,IY+.75,IZ+.75,SIZE
210 WRITE#1,IX+.75,IY+.25,IZ+.75,SIZE
220 WRITE#1,IX+.75,IY+.75,IZ+.25,SIZE
230 NEXT IZ
240 NEXT IY
250 NEXT IX
260 CLOSE#1:END